﻿using SBlogCore.Application.Demo.Dto;
using SBlogCore.Common.RemoteRequest.Attributes.Filters;

namespace SBlogCore.Application.Demo.RemoteRequest
{
    /// <summary>
    /// 远程请求
    /// </summary>
    public interface IHttpClientDemoService: IHttpDispatchProxy
    {
        /// <summary>
        /// Get请求
        /// </summary>
        /// <returns></returns>
        [Get("/api/WeatherForecast/GetAction"),Client("Test")]
        Task<string> GetAction();
        /// <summary>
        /// Get请求
        /// </summary>
        /// <returns></returns>
        [Get("/api/WeatherForecast/GetParmAction"), Client("Test")]
        Task<string> GetParmAction(string name);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="outPut"></param>
        /// <param name="title"></param>
        /// <param name="action"></param>
        /// <returns></returns>
        [Post("/api/WeatherForecast/PostParmAction"), Client("Test")]
        Task<DemoOutPut> PostParmAction([Body]DemoOutPut outPut,string title,[OnHttpClient]Action<HttpClient> action);
    }
}
